package
{
	import com.greensock.plugins.BezierPlugin;
	import com.greensock.plugins.TweenPlugin;
	import com.pblabs.engine.PBE;
	import com.solidumgame.ninja.Match;
	
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.events.Event;
	import flash.ui.Mouse;
	
	[SWF(width="640", height="480", frameRate="30")]
	
	public class PucheroNinja extends Sprite
	{
		
		protected var match:Match; 
		public static var theStage:Stage;
		//private var startUI:StartGameUI;
		//private var gameOverUI:GameOverUI;

		
		public function PucheroNinja()
		{
			
			//Activate Tween plugins
			TweenPlugin.activate([BezierPlugin]);
			Mouse.hide();
			PBE.startup(this);
			//PBE.addResources(new MyResources());
			theStage = stage;
			match = new Match();
			//startUI = new StartGameUI(stage);
			//startUI.addEventListener("startGame", startGame);			
			//addChild(startUI);

		}
		protected function startGame(e:Event):void
		{								
			match = new Match();
			//match.addEventListener(MatchGenericEvent.MATCH_END_EVENT, gameOver);
		}
		
		/*protected function gameOver(e:MatchGenericEvent):void
		{
			match.removeEventListener(MatchGenericEvent.MATCH_END_EVENT, gameOver);
			gameOverUI = new GameOverUI(stage);
			gameOverUI.addEventListener("startGame",startGame);
			addChild(gameOverUI);
		}
		*/
	}
	
}